﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KPIS.GERP.SERVICE.Model;

namespace KPIS.GERP.SERVICE.Demo
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public string in_emp_seq { get; set; }
        public string in_emp_type_seq { get; set; }
        public string in_class_seq { get; set; }
        public string in_pos_seq { get; set; }
        public string in_working_job_site_seq { get; set; }
        public string in_exec_pos_seq { get; set; }
        public string in_emp_status_seq { get; set; }
        public string in_active { get; set; }

        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasNamePrefixes { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasGenders { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasReligions { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasNationalitiesRace { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasNationalities { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmPsEmployeeTypes { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmMpClasses { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmMpClassesOld { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmMpPositions { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmMpJobSites { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmPsEmployeeStatuses { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasBloodGroups { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetHrmMpExecPositions { get; set; }
        /// <summary>
        /// set True for join this object
        /// </summary>
        public bool in_IsGetMasMaritalStatuses { get; set; }

        protected void Button1_Click(object sender, EventArgs e)
        {
            List<hrm_ps_employees> list = new DAL.Employee().GetHrmPsEmployee(
               "6"
               , in_emp_type_seq
               , in_class_seq
               , in_pos_seq
               , in_working_job_site_seq
               , in_exec_pos_seq
               , in_emp_status_seq
               , in_active
               , in_IsGetMasNamePrefixes
               , in_IsGetMasGenders
               , in_IsGetMasReligions
               , in_IsGetMasNationalitiesRace
               , in_IsGetMasNationalities
               , in_IsGetHrmPsEmployeeTypes
               , in_IsGetHrmMpClasses
               , in_IsGetHrmMpClassesOld
               , in_IsGetHrmMpPositions
               , in_IsGetHrmMpJobSites
               , in_IsGetHrmPsEmployeeStatuses
               , in_IsGetMasBloodGroups
               , in_IsGetHrmMpExecPositions
               , in_IsGetMasMaritalStatuses);

            if (list.Count > 0) {
            
                var n = list.SingleOrDefault().emp_type_seq;
                //var n = list.Select<hrm_ps_employees, int?>(r => r.emp_type_seq);
                Response.Write(n.ToString());
            }
        }
    }
}